{extend name="public:_base" /}
{block name="css"}
<link rel="stylesheet" type="text/css" href="__STATIC__/admin/uploadify/uploadify.css">
{/block}
{block name="js"}
{include file="public/_validform"}
<!--上传配置 -->
<script src="__STATIC__/admin/uploadify/jquery.uploadify.min.js" type="text/javascript"></script>
<script src="__STATIC__/admin/js/upfile.js" type="text/javascript"></script>
<!--验证-->
<script type="text/javascript">
    upload_image('image','','200','200','500');
    $("[name='lang']").find("[value='{$data.lang ?? ''}']").attr("selected", true);
    $("[name='dir']").find("[value='{$data.dir ?? ''}']").attr("selected", true);
    var URL = {
        uploader: '{:url('Upload/image')}',
        swf:'__STATIC__/admin/uploadify/uploadify.swf',
        ROOT:'__PUBLIC__/uploads/image',
    }
</script>
{/block}

{block name="main"}

<div class="page-container">

    <form action="{:url(\''.\\think\\Request::instance()->controller().'/save')}" method="post" class="form form-horizontal" id="form">
        
        <table class="table table-border table-bordered table-bg table-style">
            <thead>
                <tr>
                    <th colspan="2" scope="col">填写信息</th>
                </tr>
            </thead>
            
            <tbody>
                <tr>
                    <th>
                        <span class="c-red">*</span>标题：
                    </th>
                    <td>
                        <input type="text" class="input-text" value="{$data.title ?? ''}" placeholder="" id="title" datatype="*" name="title">
                    </td>
                </tr>
                
                <tr style="display: none;">
                    <th>
                        图片：125*125：
                    </th>
                    <td>
                        <div id="image_s">
                            <img src="__PUBLIC__/uploads/{$data.image ?'image/'.$data.image: 'sm_125.jpg'}" width="125px" height="125px"/>
                        </div>
                        <input id="image_post" name="image" type="hidden" value="{$data.image ?? ''}"/>
                        <input name="old_image" type="hidden" value="{$data.image ?? ''}"/>
                        <input id="image" name="image_upload" type="file" multiple="true">
                    </td>
                </tr>
                <tr>
                    <th>
                        泛目录：
                    </th>
                    <td>
                        <select name="dir" class="select" >
                            <option value="">--请选择--</option>
                            {volist name="nav_model" id="vo"}
                            <option value="{$key}">{$vo}</option>
                            {/volist}
                        </select>
                        <br>
                    </td>
                </tr>
                <tr style="display: none">
                    <th>
                        行数：
                    </th>
                    <td>
                        <select name="lang军区">
                            <option value="1">第一行</option>
                            <option value="2">第二行</option>
                            <option value="3">第三行</option>
                        </select>
                        <br>
                    </td>
                </tr>
                <tr>
                    <th>
                        <span class="c-red">*</span>链接地址：
                    </th>
                    <td>
                        <input type="url" class="input-text" value="{$data.url ?? ''}" placeholder="http://localhost/" id="url" datatype="url" name="url">
                    </td>
                </tr>
                
            </tbody>
            
            <tfoot>
                <tr>
                    <th></th>
                    <td>
                        {:token()}
                        <input name="id" value="{$data.id ?? ''}" type="hidden" />
                        <input class="btn radius btn-primary radius" type="submit" value="&nbsp;&nbsp;提交&nbsp;&nbsp;">
                        <input class="btn radius btn-default radius" type="reset" value="&nbsp;&nbsp;重置&nbsp;&nbsp;">
                        <!-- <button onClick="layer_close();" class="btn radius btn-default radius" type="button">&nbsp;&nbsp;取消&nbsp;&nbsp;</button> -->
                    </td>
                </tr>
            </tfoot>
            
        </table>

    </form>
    
</div>
{/block}
